Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve wraps performances #1866

Merged
merged 1 commit into from
Dec 3, 2023

Conversation

Saelyos
Copy link
Contributor

@Saelyos Saelyos commented Oct 25, 2023

Following #1862, this is another PR to improve further the performances of ureg.wraps. By keeping args and kwargs separately in _apply_defaults, the keyword-only arguments are now handled correctly (#1724).

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 25, 2023

CodSpeed Performance Report

Merging #1866 will improve performances by ×2.3

Comparing RoseauTechnologies:wraps-performance (d45f427) with master (f9e139e)

Summary

⚡ 9 improvements
✅ 430 untouched benchmarks

Benchmarks breakdown

Benchmark master RoseauTechnologies:wraps-performance Change
test_wrapper[int_meter] 662.5 µs 549.8 µs +20.51%
test_wrapper[float_kilometer] 788.8 µs 652.5 µs +20.89%
test_wrapper[complex_meter] 649.4 µs 530 µs +22.54%
test_wrapper_nonstrict[int_kilometer] 186.7 µs 84.1 µs ×2.2
test_wrapper_nonstrict[int_meter] 181.1 µs 81.6 µs ×2.2
test_wrapper_nonstrict[float_meter] 178.9 µs 77.3 µs ×2.3
test_wrapper_nonstrict[complex_meter] 156.8 µs 76.9 µs ×2
test_wrapper_nonstrict[float_kilometer] 174.5 µs 76.7 µs ×2.3
test_wrapper_nonstrict[complex_kilometer] 176.3 µs 76.8 µs ×2.3

@hgrecco hgrecco merged commit 5d533d6 into hgrecco:master Dec 3, 2023
34 checks passed
@benoit9126 benoit9126 deleted the wraps-performance branch December 4, 2023 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance of wrapper wraps does not correctly handle keyword-only arguments
2 participants